package com.sanniu.model;

import com.jfinal.kit.Ret;

import javax.swing.plaf.PanelUI;

public class BaseRet extends Ret {
    public BaseRet() {

    }

    public static BaseRet fail(int code, String message) {
        return (BaseRet) new BaseRet().setFail().set("message", message).set("code", code);
    }


    public static BaseRet data(Object data) {
        return (BaseRet) new BaseRet().setOk().set("data", data);
    }

    public static BaseRet code(int code) {
        return (BaseRet) new BaseRet().setFail().set("code", code);
    }

    public static BaseRet message(String message) {
        return (BaseRet) new BaseRet().setFail().set("message", message);
    }

}
